﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BIS.Utility.DAL.DataMapper;
using BIS.Utility.Converter;

namespace BIS.Portal.Modules.CMS.Entity
{
    public class AdminCmsDisplayTypeEntity : IEntity
    {
        #region Private

        private int _display_type_id;
        private string _display_type_name;
        private DateTime _last_update;
        private string _last_update_by;
        private int _status;
        private int _number_of_article;
        #endregion

        #region Properties
        public int Display_type_id
        {
            get { return _display_type_id; }
            set { _display_type_id = value; }
        }

        public string Display_type_name
        {
            get { return _display_type_name; }
            set { _display_type_name = value; }
        }

        public DateTime Last_update
        {
            get { return _last_update; }
            set { _last_update = value; }
        }

        public string Last_update_by
        {
            get { return _last_update_by; }
            set { _last_update_by = value; }
        }

        public int Status
        {
            get { return _status; }
            set { _status = value; }
        }

        public virtual int Number_of_article
        {
            get
            {
                return _number_of_article;
            }
            set
            {
                _number_of_article = value;
            }
        }


        #endregion

        #region Constructors
        public AdminCmsDisplayTypeEntity()
        {
        }

        public AdminCmsDisplayTypeEntity(int displayTypeId, string displayTypeName, DateTime lastUpdate, string lastUpdateBy, int status)
        {
            _display_type_id = displayTypeId;
            _display_type_name = displayTypeName;
            _last_update = lastUpdate;
            _last_update_by = lastUpdateBy;
            _status = status;
        }
        #endregion

        #region Implement
        public void Fill(System.Data.IDataReader reader)
        {
            Display_type_id = Functions.GetInt(reader["display_type_id"]);
            Display_type_name = Functions.GetString(reader["display_type_name"]);
            Last_update = Functions.GetDateTime(reader["last_update"]);
            Last_update_by = Functions.GetString(reader["last_update_by"]);
            Status = Functions.GetInt(reader["status"]);
            Number_of_article = Functions.GetInt(reader["number_of_article"]);
        }

        #endregion
    }
}
